#include <nxos.h>
#include <PowerBox.h>

NX_IMPORT NX_U16 currentHistory;
NX_IMPORT NX_U16 historyCount;
NX_IMPORT char cmdHistory[PWBOX_HISTORY_LINES][PWBOX_CMD_BUF_LEN];

NX_Error PowerBoxBuiltinHistory(int argc, char *argv[], char * env)
{
    int i;
    for (i = 0; i < historyCount; i++)
    {
        NX_Printf("%2d %s\n", i, cmdHistory[i]);
    }
    return NX_EOK;
}
